# DSE Strategy Search — Final Results

**Generated:** 2026-08-07 04:20:15

## Method

- **Universe:** 391 DSE stocks, daily data 2015–2026 (CSVs in `dse_all_shares/`).
- **Backtest:** long-only swing trades, one open position per stock, no lookahead.
  Entry at signal bar close; exit at stop-loss / take-profit / trailing stop / max hold days.
- **Grid search:** 4,096 parameter combinations (RSI band, hold days, stop-loss, take-profit,
  trailing stop, trend filter, MACD filter, 5-day momentum, ATR volatility filter).
- **Walk-forward validation (anti curve-fitting):**
  - *Train* 2015–2022 — used to *select* the best configs.
  - *Test (Out-of-Sample)* 2023–2026 — held out, used to *rank* final configs.

> **Reading the returns:** `total_return_pct` is the **sum** of every individual trade's
> percentage return across thousands of trades (e.g. +10%, -4%, +6% ... summed). It is NOT a
> compounded portfolio return. Treat it as a relative score, not a promise of returns.

## 🏆 Most Profitable Strategy (Out-of-Sample)

| Metric | Out-of-Sample (2023–26) | Full (2015–26) |
|---|---|---|
| Sum of trade returns | **20239%** | 73315% |
| Win rate | 38.9% | 41.4% |
| Trades | 14662 | 44088 |
| Avg trade return | 1.38% | 1.66% |

**Parameters:**

```json
{
  "rsi_min": 25,
  "rsi_max": 80,
  "hold_days": 45,
  "stop_loss_pct": 0.0,
  "take_profit_pct": 10.0,
  "trailing_stop_pct": 3.0,
  "trend_filter": "none",
  "require_macd": true,
  "mom5_min": 0.0,
  "max_atr_pct": 0.9
}
```

Plain English: buy a stock when its 5-day momentum is positive and MACD is above its signal line
(momentum confirmation), exit after 10% gain OR when price drops 3% from its running peak (trailing stop),
or after 45 trading days max. No hard stop-loss, no trend filter — it rides winners and clips gains.

## 🎯 Best Win-Rate Strategy (Out-of-Sample)

| Metric | Out-of-Sample (2023–26) | Full (2015–26) |
|---|---|---|
| Win rate | **52.9%** | 53.3% |
| Sum of trade returns | -573% | 8195% |
| Trades | 5988 | 20095 |
| Avg trade return | -0.10% | 0.41% |

**Parameters:**

```json
{
  "rsi_min": 0,
  "rsi_max": 80,
  "hold_days": 45,
  "stop_loss_pct": 0.0,
  "take_profit_pct": 10.0,
  "trailing_stop_pct": 0.0,
  "trend_filter": "ema50",
  "require_macd": true,
  "mom5_min": 0.0,
  "max_atr_pct": 0.9
}
```

Plain English: buy only stocks trading above their 50-day EMA (uptrend) with MACD confirmation;
exit at +10% take-profit or after 45 days (no trailing, no stop-loss). This wins more often
(small frequent wins) but the average win is smaller and the out-of-sample period lost money
in aggregate — high win rate alone is not the same as profitability.

## Honest Caveats

- **Out-of-sample is the real test.** The most-profitable config made ~20,000% *summed* return on
  2023–26 data it never saw during selection — that's the strongest evidence in this exercise.
  The win-rate leader lost money on OOS despite a 52.9% win rate, showing why win rate alone is a trap.
- **Costs are NOT fully modeled.** DSE charges fees + taxes (roughly 0.35–1% round trip). These
  strategies trade frequently (thousands of times), so real net returns will be far lower.
- **No slippage / liquidity limits modeled.** A 10%-take-profit assumes you can sell at that price.
- **Sum-of-returns ≠ compounded growth.** Real portfolio growth depends on position sizing and
  overlap; this is a ranking score, not a P&L projection.

## Files Produced

- `DSE_strategy_signals.csv` — all trades for both strategies (OOS).
- `DSE_strategy_max_return_signals.csv` — trades of the most-profitable strategy.
- `DSE_strategy_max_winrate_signals.csv` — trades of the best-win-rate strategy.
- `strategy_lab/final_report.json` — full ranked results (top 20 each).
